#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int i = 0;
	int a = 0;
	int sum = 1;
	scanf("%d", &i);
	for (a = 1; a <= i; a++)
	{
		sum = sum * a;
	}
	printf("%d\n",sum);
	return 0;
}